home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / tcp / IPDial1_3.readme < prev    next >
Text File  |  1995-07-02  |  7KB  |  223 lines

  1. Short:    SLIP dialer; stdin/out terminal program
  2. Author:   jochen.wiedmann@zdv.uni-tuebingen.de
  3. Uploader: jochen.wiedmann@zdv.uni-tuebingen.de
  4. Type:     comm/tcp
  5.  
  6.  
  7. IPDial - serial device communication program
  8. ============================================
  9.  
  10.  
  11. IPDial is designed especially for creating a SLIP connection via the
  12. modem to a remote host: It can dial the remote hosts number, login
  13. into the host and initilize a SLIP connection. Configuring IPDial
  14. is rather easy, as it reads its command from a textfile.
  15.  
  16. IPDial is best used from AmiTCP's startnet and stopnet scripts. This
  17. allows you to completely connect or disconnect by just typing the
  18. words "startnet" or "stopnet", respectively.
  19.  
  20.  
  21. 1.) Disclaimer: Copyrights, (No) Warranty
  22. -----------------------------------------
  23.  
  24. This program is Copyright (C) 1994  Jochen Wiedmann
  25.                     Am Eisteich 9
  26.                     72555 Metzingen
  27.                     Germany
  28.  
  29.                     Phone: (0049) +7123 / 14881
  30.                     Mail: jochen.wiedmann@uni-tuebingen.de
  31.  
  32.  
  33. Permission is granted to make and distribute either verbatim and modified
  34. copies of this documentation and the program IPDial provided the copyright
  35. notice and this permission notice are preserved on all copies and the "GNU
  36. General Public License" (in the file COPYING) is distributed as well.
  37.  
  38. The author gives ABSOLUTELY NO warranty that the program described in this
  39. documentation and the results produced by them are correct. The author
  40. cannot be held responsible for ANY damage resulting from the use of this
  41. software.
  42.  
  43.  
  44. 2.) Installation
  45. ----------------
  46.  
  47. Rather simple. Just copy the program to a place in your path and edit
  48. the two files "login.script" and "hangup.script". (See Script file
  49. syntax below for details.)
  50.  
  51. You might want to enter the line
  52.  
  53.     IPDial login.script
  54.  
  55. at the beginning of AmiTCP's startnet script. Thus you get a SLIP
  56. connection by simply typing startnet.
  57.  
  58. Similar you could add the line
  59.  
  60.     IPDial hangup.script
  61.  
  62. at the bottom of the stopnet script.
  63.  
  64.  
  65. 3.) Invocation
  66. --------------
  67.  
  68. IPDial is started like this:
  69.  
  70.     IPDial SCRIPT,ECHO/S,VERBOSE/S,TERMINAL/S,DEVICE/K,PROTOCOL/K,UNIT/K/N
  71.  
  72. What IPDial does, depends on the TERMINAL switch: If this is active,
  73. the arguments DEVICE, UNIT and PROTOCOL are used to open the
  74. serial.device. Once it is opened, the program acts as a very simple
  75. terminal program.
  76.  
  77. If TERMINAL is omitted, the given SCRIPT is read and the commands
  78. of the script are executed line by line. (See below) The argument
  79. ECHO instructs IPDial to print the modems replies to stdout, while
  80. VERBOSE is used to show what the program's doing.
  81.  
  82.  
  83. 4.) Script file syntax
  84. ----------------------
  85.  
  86. - Any line of the script file may contain only one command. In
  87.   general command arguments are parsed with ReadArgs(), thus they
  88.   may look like CLI command line arguments: The characters "" may
  89.   surround a string which contains blanks.
  90.  
  91. - Empty lines or lines beginning with a semicolon are assumed to
  92.   be comments and thus ignored.
  93.  
  94. - Lines may begin with a label, an alphanumeric word followed by
  95.   a colon. Labels are ignored, except that they may be used as
  96.   destinations for "goto" instructions. (Anyone said BASIC? Yes,
  97.   it is. :-) Labels are case-sensitive.
  98.  
  99. - This is the list of possible commands:
  100.  
  101.     DEVICE NAME/A,PROTOCOL,UNIT/K/N
  102.     Opens the given device NAME with unit UNIT (Default 0).
  103.     This must be compatible to the serial.device. PROTOCOL
  104.     may be one of XONXOFF, RTSCTS, 7WIRE (Synonym for RTSCTS)
  105.     or NONE. Note that explicitly requesting a protocol
  106.     overwrites the defaults set by the Derial preferences
  107.     program.
  108.  
  109.     The DEVICE command should in general be the first command
  110.     of each script.
  111.  
  112.     SET BAUD/N/K,DATABITS/N/K,STOPBITS/N/K,BUFSIZE/N/K,PARITY/K
  113.     This command is used to modify the serial.device parameters.
  114.     Note, that these overwrite the Serial preferences. Possible
  115.     parameters are:
  116.         BAUD    baud rate
  117.         DATABITS    number of databits
  118.         STOPBITS    number of stopbits
  119.         BUFSIZE    read buffer size
  120.         PARITY    one of ODD, EVEN or NONE
  121.  
  122.     SHOWPARMS
  123.     Writes the current serial.device settings to stdout.
  124.  
  125.     ECHO ARGS/M
  126.     This will write the given ARGS to stdout. Note, that these
  127.     strings may contain patterns like \r (Carriage Return),
  128.     \n (Line Feed) and \\ (Backslash :-) The arguments are
  129.     separated by blanks, when they are printed.
  130.  
  131.     Note that ECHO does not write any Line Feeds or Carriage
  132.     Returns unless you explicitly request it with the respective
  133.     patterns.
  134.  
  135.     SEND ARGS/M
  136.     This command sends the given strings to the serial.device
  137.     using DoIO(). These strings may contain the same patterns
  138.     as described with the ECHO command. Unlike ECHO the arguments
  139.     aren't separeted by blanks.
  140.  
  141.     The words given with ARGS may contain patterns like $HOST or
  142.     ${HOST}: These are replaced by the respective environment
  143.     variable. (Empty string, if the variable doesn't exist.)
  144.     $$ represents the $ character itself.
  145.  
  146.     DELAY SECS/A
  147.     Delays the given number of seconds.
  148.  
  149.     WAIT TIMEOUT/K/N/A,ARGS/M
  150.     This command waits until either one of the given strings
  151.     is read from the serial.device or the number of seconds
  152.     given by TIMEOUT has gone.
  153.  
  154.     A variable called STATUS indicates what happened: It contains
  155.     either -1 for timeout or the number of the string that was
  156.     read, beginning with 0. This variable may be used by the
  157.     ON statement.
  158.  
  159.     ON STATUS GOTO LABELS/M
  160.     There's currently only one version of the ON command.
  161.     An ON command must follow a WAIT command. ON reads the
  162.     value of the STATUS variable and jumps to the first
  163.     one, if STATUS is -1, to the second, if STATUS is 0 and
  164.     so on. A typical use of WAIT/ON looks like this:
  165.  
  166.         WAIT TIMEOUT=10 "Login:" "Busy"
  167.         ON STATUS GOTO TimeOut Login Busy
  168.  
  169.         TimeOut:
  170.         ECHO "Timeout happened, aborting.\n"
  171.         EXIT 10
  172.  
  173.         Busy:
  174.         ECHO "Remote busy, delaying...\n"
  175.         DELAY 25
  176.         ECHO "Trying again.\n"
  177.         GOTO DialAgain
  178.  
  179.         Login:
  180.         ;    Execute the login procedure
  181.  
  182.     You do not need to supply a label for any wait string:
  183.     This will suppress jumping and instead continue on
  184.     the next line.
  185.  
  186.     GOTO LABEL/A
  187.     Jumps to the given label
  188.  
  189.     TERMINAL
  190.     Enters terminal mode: What you enter at the keyboard will
  191.     be sent to the serial.device and likewise the program will
  192.     display any input from the serial.device to you. The
  193.     TERMINAL command will be finished, if you enter EOF
  194.     (Ctrl-\).
  195.  
  196.     EXIT RESULT
  197.     Terminates the program, returns the given RESULT. (Defaults
  198.     to 0.)
  199.  
  200.   Commands are case-insensitive.
  201.  
  202. See the scrips Login.IPDial and Hangup.IPDial as examples.
  203.  
  204.  
  205. ============================= Archive contents =============================
  206.  
  207. Original  Packed Ratio    Date     Time    Name
  208. -------- ------- ----- --------- --------  -------------
  209.     5012    1997 60.1% 02-Mar-95 19:03:10 +Buffer.c
  210.    17982    6993 61.1% 02-Mar-95 19:03:10 +COPYING
  211.     4401    1674 61.9% 02-Mar-95 19:03:10 +DeviceIO.c
  212.     3549    1211 65.8% 15-Mar-95 09:55:26 +DMakefile
  213.     1618     713 55.9% 02-Mar-95 19:03:10 +Hangup.IPDial
  214.    32780   17802 45.6% 02-Mar-95 19:03:10 +IPDial
  215.    15811    4862 69.2% 02-Mar-95 19:03:10 +IPDial.c
  216.     2783    1137 59.1% 02-Mar-95 19:03:10 +IPDial.h
  217.     6505    2949 54.6% 02-Mar-95 19:03:10 +IPDial.readme
  218.     3817    1310 65.6% 02-Mar-95 19:03:10 +Login.IPDial
  219.    15396    4361 71.6% 02-Mar-95 19:03:10 +Serial.c
  220.     2022    1028 49.1% 02-Mar-95 19:03:10 +StrReadArgs.c
  221. -------- ------- ----- --------- --------
  222.   111676   46037 58.7% 21-Mar-95 14:26:04   12 files
  223.